import axios from '@/request/http'; // 导入http中创建的axios实例
import jsonp from 'jsonp';

const trainingReduction = {


  //////////////// 减免↓
  // 获取查询条件
  Getcondition:function(st,pid,sid,gid){
    return axios.post('/server/payment/tuition/load/search',{searchType:st,projectId:pid,schoolId:sid,gradeId:gid})
  },
  // 获取减免列表
  GetReductionList:function(pid,ss,sId,gId,stn,idc,cid,it,pin){
    return axios.post('/server/payment/tuition/load/list',{projectId:pid,studentSource:ss,schoolId:sId,gradeId:gId,category:stn,studentQuery:idc, classId:cid, isTuition:it, page:pin})
  },
  // 加载减免初始化数据
  GetReductionInitializedData:function(pid,sid,ss){
    return axios.post('/server/payment/tuition/load/detail',{projectId:pid,studentId:sid,studentSource:ss})
  },
  //
  VerificationReduction:function(pid,sid){
    return axios.post('/server/payment/tuition/check/operate',{projectId:pid,studentId:sid})
  },
  // 保存新增减免 flag:'ADD',
  SaveReduction:function(pid,sid,idc,rk,fid,tt){
    return axios.post('/server/payment/tuition/save/detail',{projectId:pid,studentId:sid,idCard:idc, remark:rk, fileIds:fid,itemList:JSON.stringify(tt)})
  },
  //////////////// 减免↑



  //////////////// 需缴纳学生列表↓
  // 获取需缴纳学生列表
  GetPayForStudentList:function(sq,pin){
    return axios.post('/server/special/amount/load/list',{studentQuery:sq,page:pin})
  },
  // 加载缴费操作
  GetPaymentOperation:function(){
    return axios.post('/server/special/amount/load/detail',{})
  },
  //保存补录内容
  SaveSupplement:function(pm,fs,obg){
    return axios.post('/server/special/amount/save/detail',{payableMoney:pm,fileIds:fs, specialAmount:JSON.stringify(obg)})
  },
  //////////////// 需缴纳学生列表↑



  //////////////// 特训费报表↓
  // 获取特训费列表
  GetSpecialSrainingPayList:function(qt,sq,st,et,pin){
    return axios.post('/server/special/amount/load/report/list',{queryType:qt,studentQuery:sq,startTime:st,endTime:et,page:pin})
  },

  // 获取特训费搜索条件
  GetSearchCriteria:function(sid){
    return axios.post('/server/special/amount/load/search',{schoolId:sid})
  },
  // 获取学校
  GetSpecialSrainingSchoolList:function(){
    return axios.post('/server/special/amount/school/load/school',{})
  },

  //获取学校下设置详情
  GetSchoolSetUp:function(sid){
    return axios.post('/server/special/amount/school/load/detail',{schoolId:sid})
  },
  // 保存修改学校特训费保存
  SaveSchoolSetUp:function(obg){
     var specialAmountSchoolView = JSON.stringify(obg)
    return axios.post('/server/special/amount/school/save/detail',JSON.stringify(obg),{headers:{ "Content-Type": "application/json" }})
  },
  // 获取特训费实收列表
  GetSpecialSrainingNetReceiptsList:function(qt,sq,stim,etim,sid,gid,idf,pin){
    return axios.post('/server/special/amount/load/report/supplement',{queryType:qt,studentQuery:sq,startTime:stim,endTime:etim,schoolId:sid,gradeId:gid,isDifference:idf,page:pin})
  },

  // 获取特训费退费列表
  GetSpecialSrainingRefundList:function(qt,sq,stim,etim,sid,gid,pin){
    return axios.post('/server/special/amount/load/report/refund',{queryType:qt,studentQuery:sq,startTime:stim,endTime:etim,schoolId:sid,gradeId:gid,page:pin})
  },
  GetRefundFileList:function(sid){
    return axios.post('/server/special/amount/load/report/refund/files',{serialId:sid})
  }


  //////////////// 特训费报表↑
}

export default trainingReduction
